package com.link.speechdemo;

import com.link.speechdemo.speech.SynthesizerSpeech;
import com.link.speechdemo.speech.UnderstanderSpeech;

/**
 * Created by link on 2016/11/3.
 */

public class Singleton {
    private static class LazyHolder {
        private static final JudgeServiceType JUDGE_SERVICE_TYPE = new JudgeServiceType();
        private static final UnderstanderSpeech UNDERSTANDER_SPEECH = new UnderstanderSpeech();
        private static final SynthesizerSpeech SYNTHESIZER_SPEECH = new SynthesizerSpeech();
    }

    private Singleton() {
    }

    public static final JudgeServiceType getJInstance() {
        return LazyHolder.JUDGE_SERVICE_TYPE;
    }
    public static final UnderstanderSpeech getUInstance() {
        return LazyHolder.UNDERSTANDER_SPEECH;
    }
    public static final SynthesizerSpeech getSInstance() {
        return LazyHolder.SYNTHESIZER_SPEECH;
    }
}
